<%@ page language="java"  pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>综合咨询平台</title>
<link rel="stylesheet" href="<%=request.getContextPath() %>/resources/validform/css/demo.css" type="text/css"></link>
<link rel="stylesheet" href="<%=request.getContextPath() %>/resources/validform/css/style.css" type="text/css"></link>
<link rel="stylesheet" href="<%=request.getContextPath() %>/resources/admin/css/add.css" type="text/css"></link>
<script type="text/javascript" src="<%=request.getContextPath() %>/resources/js/jquery-1.9.1.min.js"></script>
</head>
<body>
  <form id="myForm" class="myform" enctype="multipart/form-data" suc_url="<%=request.getContextPath() %>/user!searchUser.action?page=${request.curPage}" action="<%=request.getContextPath() %>/user!insertUser.action"  name="myForm">
  	<div id="inside_content">
		<div id="dynamic">你现在所在的位置：用户管理>>新增用户</div>
		<div id="add_content">
			<div id="add_title">
				&nbsp;新增用户
				<ul>
					<li><input type="submit" value="" style="background: url(<%=request.getContextPath() %>/resources/admin/images/add.png) top left no-repeat;"/></li>
					<li><input type="reset" value="" style="background: url(<%=request.getContextPath() %>/resources/admin/images/add_reset.png) top left no-repeat;"/></li>
					<li><input  onclick="back();" type="button" value="" style="background: url(<%=request.getContextPath() %>/resources/admin/images/add_return.png) top left no-repeat;"/></li>
				</ul>
			</div>
			<table id="table_content"  >
				<tr>
		 			<td >登录帐号</td>
		 			<td style="width: 200px;">
		 				<input name="username"  type="text"  class="inputxt" datatype="*" nullmsg="请输入登录帐号"   />
		 			</td>
		 			<td class="Validform_checktip"></td>
	 			</tr>
	 			
	 			<tr>
		 			<td >密码</td>
		 			<td style="width: 200px;">
		 				<input class="inputxt" type="password" errormsg="密码范围在6~16位之间！" nullmsg="请设置密码！" datatype="*6-16" name="password" value="">
		 			</td>
		 			<td class="Validform_checktip"></td>
	 			</tr>
	 			<tr>
		 			<td >确认密码</td>
		 			<td style="width: 200px;">
		 				<input class="inputxt" type="password" errormsg="您两次输入的账号密码不一致！" nullmsg="请再输入一次密码！" recheck="password" datatype="*" tip="test" name="userpassword2" value="">
		 			</td>
		 			<td class="Validform_checktip"></td>
	 			</tr>
	 			<tr>
		 			<td >姓名</td>
		 			<td style="width: 200px;">
		 				<input class="inputxt" type="text" name="xm" errormsg="您输入中文名字！" ignore="ignore" value="" datatype="*">
		 			</td>
		 			<td class="Validform_checktip"></td>
	 			</tr>
	 			
	 			<tr>
		 			<td >性别</td>
		 			<td style="width: 230px;">
		 				<img src="/isp/resources/admin/images/boy.png">
						<input id="sex" type="radio" value="0" name="sex"  checked="checked"   >	
						<img src="/isp/resources/admin/images/girl.png">
						<input id="sex" type="radio" value="1" name="sex"  >
		 			</td>
	 			</tr>
	 			<tr>
		 			<td >移动电话</td>
		 			<td style="width: 200px;">
		 				<input class="inputxt" type="text" errormsg="您输入的手机号码格式错误！" ignore="ignore"  datatype="m"  name="phone" value="">
		 			</td>
		 			<td class="Validform_checktip"></td>
	 			</tr>	 			
	 			<tr>
		 			<td >QQ</td>
		 			<td style="width: 200px;">
		 				<input class="inputxt" type="text" errormsg="您输入的QQ格式错误！" ignore="ignore"  datatype="n5-11"  name="qq" value="">
		 			</td>
		 			<td class="Validform_checktip"></td>
	 			</tr>
	 			<tr>
		 			<td >E-Mail</td>
		 			<td style="width: 200px;">
		 				<input class="inputxt" type="text" errormsg="您输入的email格式错误！" ignore="ignore"  datatype="e"  name="email" value="">
		 			</td>
		 			<td class="Validform_checktip"></td>
	 			</tr>
	 			<tr>
		 			<td >是否启用</td>
		 			<td style="width: 200px;">
		 				<button class="mwui-switch-btn"><span change="否">是</span><input type="hidden" name="sfqy" value="1" /></button>	
		 			</td>
	 			</tr>
	 			<tr>
		 			<td >岗位</td>
		 			<td style="width: 200px;">
		 				<select id="role_id" name="role_id">
		 				<c:forEach var="role" items="${request.roleList }">
		 					<option value="${role.id}" >${role.rolename }</option>
		 				</c:forEach>
						</select>
		 			</td>
	 			</tr>
	 			
			</table>
			<div class="clear"></div>
		</div>
	</div>
</form>
 <script type="text/javascript"  src="<%=request.getContextPath() %>/resources/js/jquery.form.js"></script>
 <script type="text/javascript"  src="<%=request.getContextPath() %>/resources/validform/js/Validform_v5.3.2.js"></script>
 <script type="text/javascript"  src="<%=request.getContextPath() %>/resources/js/common.js"></script>
 <script type="text/javascript"  src="<%=request.getContextPath() %>/resources/js/opform.js"></script>
</body>
<script type="text/javascript">
	$(function() {
		$('.mwui-switch-btn').each(function() {
			$(this).bind("click", function() { 
				var btn = $(this).find("span");
				var change = btn.attr("change");
				btn.toggleClass('off'); 

				if(btn.attr("class") == 'off') { 
					$(this).find("input").val("0");
					btn.attr("change", btn.html()); 
					btn.html(change);
				} else { 
					$(this).find("input").val("1");
					btn.attr("change", btn.html()); 
					btn.html(change);
				}  
				return false;
			});
		});
	});
</script> 
</html>